package com.neu.flashmall.ms.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.sql.DataSource;

@Configuration
@EnableTransactionManagement
public class TransactionConfig {

    @Bean
    public DataSourceTransactionManager dataSourceTransactionManager(DataSource datasource) {

        DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(datasource);

        return dataSourceTransactionManager;
    }


}
